package com.c2soft.nepalcmx.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.c2soft.nepalcmx.command.BrokeOrderCommand;
import com.c2soft.nepalcmx.command.NetPositionCommand;
import com.c2soft.nepalcmx.command.OrderCommand;
import com.c2soft.nepalcmx.dao.BrokeOrderMgmtDAO;
import com.c2soft.nepalcmx.dao.OrderMgmtDAO;

@Service
public class BrokeOrderMgmtService {

	@Autowired
	private BrokeOrderMgmtDAO orderMgmtDAO;

	public void buyService(BrokeOrderCommand buy) {
		orderMgmtDAO.saveBuyService(buy);
	}

	public void sellService(BrokeOrderCommand sell) {
		orderMgmtDAO.saveSellService(sell);
	}

	public void futureService(OrderCommand sell) {
	}
	
public List<NetPositionCommand> getBuyOrder(String brokerId) {
		
		return orderMgmtDAO.findBuyOrder(brokerId);
	}

public List<NetPositionCommand> getExchangeBuyOrder() {
	
	return orderMgmtDAO.findExchangeBuyOrder();
}

}
